package org.dut.community.dao;

import org.apache.ibatis.annotations.*;
import org.dut.community.entity.LoginTicket;

@Mapper
@Deprecated
public interface LoginTicketMapper {
    @Insert("insert into login_ticket(user_id,ticket,status,expired) " +
            "values(#{userId},#{ticket},#{status},#{expired})")
    @Options(keyProperty = "id",useGeneratedKeys = true)
    int insertLoginTicket(LoginTicket loginTicket);

    @Select("select * from login_ticket where ticket = #{ticket}")
    LoginTicket selectByTicket(String ticket);

    @Update("update login_ticket set status = #{status} where ticket = #{ticket}")
    int updateLoginTicket(String ticket,int status);
}
